﻿Type.registerNamespace("Blog");

Blog.HtmlEditorValueHandler = function(leafItem) {
	Blog.HtmlEditorValueHandler.initializeBase(this, [leafItem]);
}

Blog.HtmlEditorValueHandler.prototype = {
	getControlValue: function() {
		return this.getEditorControl().get_content();
	},

	setControlValue: function(value) {
		this.getEditorControl().set_content(value);
	},

	getEditorControl: function() {
		var editorId = this.getInput().id;
		return $find(editorId);
	}
}

BM.ValueHandler['HtmlEditorValueHandler'] = Blog.HtmlEditorValueHandler;
Blog.HtmlEditorValueHandler.registerClass("Blog.HtmlEditorValueHandler", BM.ValueHandler);